package world.ztomorrow.push.dto.resp;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@Builder
@ApiModel(description = "新闻信息 响应DTO")
public class NewsInfoRespDto {
    /**
     * ID
     */
    @ApiModelProperty( "新闻ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /**
     * 类别ID
     */
    @ApiModelProperty( "类别ID")
    private Long categoryId;

    /**
     * 类别名
     */
    @ApiModelProperty( "类别名")
    private String categoryName;

    /**
     * 新闻来源
     */
    @ApiModelProperty( "新闻来源")
    private String sourceName;

    /**
     * 新闻标题
     */
    @ApiModelProperty( "新闻标题")
    private String title;

    /**
     * 更新时间
     */
    @ApiModelProperty( "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime updateTime;

    /**
     * 新闻内容
     */
    @ApiModelProperty( "新闻内容")
    private String content;

}
